<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<%
	xMode = Request("xMode")
	showSubMenu = "90"
	chPerm = "none"
	if Request.Cookies("S_uid") = "hooshim" then 
		chPerm = ""
	end if 
	
	
	isPerm = ""
	If Request.Cookies("S_level") = "05" then 
		isPerm = "none"
	End if
		
	'## ■■ User 정보 가져오기 ■■■■
	userSQL = "SELECT userId, userNm FROM tblUser WHERE delYN='N' AND gwYN='Y' AND userId <> '" & Request.Cookies("S_uid") & "' AND uLevel<>'05' ORDER BY userNm" 

	Set userRs=Server.CreateObject("ADODB.RecordSet")
	userRs.open userSQL, DbCon, 1
	
	userOptions = ""
	If userRs.eof Or userRs.bof Then 
	Else 
		Do Until userRs.eof Or userRs.bof
		
		userOptions = userOptions & "<option value=""" & userRs("userId") & """>" & userRs("userNm") & "</option>"' & vbcrlf
		userRs.movenext
		Loop 
	End If
	
%>
<!-- #include virtual=/inc/header_cross.inc.asp -->  

<script language="javascript">    
		 $(document).ready(function() {
			  var clareCalendar = {
			   monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
			   dayNamesMin: ['일','월','화','수','목','금','토'],
			   weekHeader: 'Wk',
			   dateFormat: 'yy-mm-dd',														// 날짜형식(2012-03-03)
			   autoSize: false,																	//자동리사이즈(false 이면 상위 정의에 따름)
			   changeMonth: true,															// true이면 월변경, false이면 월변경못함
			   changeYear: true,																// true이면 년변경, false이면 년변경못함
			   showMonthAfterYear: true,													//년 뒤에 월 표시
			   buttonImageOnly: true,														//이미지표시
			   //buttonText: '달력선택',														//버튼 텍스트 표시
			   //buttonImage: '/calendar.gif',												//이미지주소
			   //showOn: "both",																//엘리먼트와 이미지 동시 사용(both,button)
			   yearRange: 'c-99:c+99',													//1990년부터 2020년까지
			   maxDate: '+2Y',																	// 오늘부터6년후날짜까지만, '+0d' 오늘 이전 날짜만 선택
			   minDate: '-5y'
			  };
			  $("#findStartDt1").datepicker(clareCalendar);
			  $("#findEndDt1").datepicker(clareCalendar);
			  $("#findStartDt2").datepicker(clareCalendar);
			  $("#findEndDt2").datepicker(clareCalendar);
			  $("img.ui-datepicker-trigger").attr("style","margin-left:5px; vertical-align:middle; cursor:pointer;"); //이미지버튼 style적용
			  $("#ui-datepicker-div").hide(); //자동으로 생성되는 div객체 숨김  
		});
		
	   $(window).load(function(){
	   		fnShowLyr();
			fnCommonInit();
	    });     
</script>

<BODY topmargin="0" leftmargin="0">
<!-- #include virtual=/inc/menu.inc.asp -->  

<br>
<!-- 검색 영역 시작 -->
<div style="text-align:left;margin-top:10px;z-index:100;">
<!-- #include virtual=/inc/subMenu.inc.asp --> 
	<div style="position:absolute;width:380px;height:50px;z-index:10;top:70px;left:751px;text-align:right;">
		<div style="float:left;width:100px;display:<%=chPerm%>"> <select id="setUser" style='margin-top:10px'><option value="">-권한 위임-</option><%=userOptions%></select></div>
		<div id="groupSubMenu1" onClick="fnChSubMenu(1)" class="lTD_trbl" style="float:left;width:80px;border-bottom:5px #009900 solid;background-color:#eaf2fd;font-weight:bold;height:30px;cursor:pointer;"><p>수신문서</p></div>
		<div id="groupSubMenu2" onClick="fnChSubMenu(2)" class="lTD_trb0" style="float:left;width:80px;background-color:#eaf2fd;height:30px;cursor:pointer;"><p>발송문서</p></div>
		<div id="groupSubMenu3" onClick="fnChSubMenu(3)" class="lTD_trb0" style="float:left;width:80px;background-color:#eaf2fd;height:30px;cursor:pointer;"><p>보관문서</p></div>
	</div>
	
 	<table border="0" cellpadding="0" cellspacing="0" width="1120" style="margin-left:5px;" id="searchArea1">
		<tr height="40">
			<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl"> &nbsp;
				<input type="text" id="findStartDt1" style="width:80px;text-align:center;" class="inputBox" value="<%=dateadd("m","-3",date())%>"> ~  <input type="text" id="findEndDt1" style="width:80px;text-align:center;" class="inputBox" value="<%=date()%>"> &nbsp;
				<select id="findWriteId1"><option value="">-발신자-</option><%=userOptions%></select> &nbsp;
				검색어 <input type="text" id="findWord1" class="inputBox" style="width:120px;ime-Mode:active"> &nbsp;
				<input type="checkbox" id="status01" checked>미인지
				<input type="checkbox" id="status02" checked>인지
				<input type="checkbox" id="status03" checked>진행
				<input type="checkbox" id="status04">완료 &nbsp;
				<input type="button" onClick="grid01List()" value="검 색" class="inputBtn">&nbsp;
				<input type="button" onClick="fnSearch1Reset()" value="Reset" class="inputBtn" style="margin-right:20px;">
				<input type="button" onClick="fnOpenWorkWrite('','')" value="새 글" class="inputBtn" style="width:80px;border-bottom:2px #ff3300 solid;font-weight:bold;height:25px;">
			</td>
		</tr>
	</table> 
 	<table border="0" cellpadding="0" cellspacing="0" width="1120" style="margin-left:5px;display:none;" id="searchArea2">
		<tr height="40">
			<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl"> &nbsp;
				<input type="text" id="findStartDt2" style="width:80px;text-align:center;" class="inputBox" value="<%=dateadd("m","-3",date())%>"> ~  <input type="text" id="findEndDt2" style="width:80px;text-align:center;" class="inputBox" value="<%=date()%>"> &nbsp;
				<select id="findRcvrs2"><option value="">-수신자-</option><%=userOptions%></select> &nbsp;
				검색어 <input type="text" id="findWord2" class="inputBox" style="width:120px;ime-Mode:active"> &nbsp;
				<input type="button" onClick="grid02List()" value="검 색" class="inputBtn">&nbsp;
				<input type="button" onClick="fnSearch2Reset()" value="Reset" class="inputBtn" style="margin-right:20px;">
				<input type="button" onClick="fnOpenWorkWrite('','')" value="새 글" class="inputBtn" style="width:80px;border-bottom:2px #ff3300 solid;font-weight:bold;height:25px;">
			</td>
		</tr>
	</table>
 	<table border="0" cellpadding="0" cellspacing="0" width="1120" style="margin-left:5px;display:none;" id="searchArea3">
		<tr height="40">
			<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl"> &nbsp;				
				<select id="findWriteId3"><option value="">-작성자-</option><%=userOptions%></select> &nbsp;
				검색어 <input type="text" id="findWord3" class="inputBox" style="width:120px;ime-Mode:active"> &nbsp;
				<input type="button" onClick="grid03List()" value="검 색" class="inputBtn">&nbsp;
				<input type="button" onClick="fnSearch3Reset()" value="Reset" class="inputBtn" style="margin-right:20px;">
				<input type="button" onClick="fnOpenWorkWrite('','')" value="새 글" class="inputBtn" style="width:80px;border-bottom:2px #ff3300 solid;font-weight:bold;height:25px;">
			</td>
		</tr>
	</table>
</div>
<!-- 검색 영역 끝 -->

<br>

<!-- 그리드 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1235" style="margin-left:5px;text-align:left">
	<tr>
		<td width="100%" valign="top" style="padding: 5px 5px 5px 5px;">
			<div id="layerList" class="lTD_trbl" style="position:absolute;width:800px;background-color:#fff;padding:10px 10px 10px 10px; z-index:10;top:173px;left:10px;">
				<div id="workList1" style="display:">
					<table border="0" cellpadding="0" cellspacing="0" width="800">
						<tr height="24">
							<td style="padding: 0 0 0 0;text-align:left" width="400"><input type="button" class="subTitleBtn" style="width:90px;" value="1. 수신문서" ReadOnly>&nbsp;<a href="javascript:grid01List()">[새로고침]</a> &nbsp; </td>
							<td style="padding: 0 5px 0 0;" align="right" width="390"><B>Total :</B> <span id="grid01Cnt" style="font-weight:bold">0</span></td>
						</tr>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" width="800"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>				
					<div id="grid1">
						<div id="gridHeader1">
							<div style="width:50px"><p>No</p></div>
							<div style="width:80px"><p>마감일</p></div>
							<div style="width:60px"><p>상 태</p></div>
							<div style="width:364px"><p>제 목</p></div>
							<div style="width:60px"><p>작성자</p></div>
							<div style="width:80px"><p>작성시간</p></div>
							<div style="width:80px"><p>수정시간</p></div>
							<div style="width:18px">&nbsp;</div>
						</div>
						<div id="noResult1">
							<div><p>결과가 없습니다.</p></div>
						</div>
						<div id="gridBody1" style="display:none;">								
						</div>
						<div id="gridTail1" style="">
							<div class="term"></div>
							<div id="pager1"></div>
						</div>
					</div>				
				</div>	
				<div id="workList2" style="display:none">
					<table border="0" cellpadding="0" cellspacing="0" width="800">
						<tr height="24">
							<td style="padding: 0 0 0 0;text-align:left" width="400"><input type="button" class="subTitleBtn" style="width:90px;" value="2. 발송문서" ReadOnly>&nbsp;<a href="javascript:grid02List()">[새로고침]</a> &nbsp; </td>
							<td style="padding: 0 5px 0 0;" align="right" width="390"><B>Total :</B> <span id="grid02Cnt" style="font-weight:bold">0</span></td>
						</tr>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" width="800"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>				
					<div id="grid2">
						<div id="gridHeader2">
							<div style="width:50px"><p>No</p></div>
							<div style="width:60px"><p>수신자</p></div>
							<div style="width:60px"><p>상 태</p></div>
							<div style="width:364px"><p>제 목</p></div>
							<div style="width:80px"><p>마감일</p></div>
							<div style="width:80px"><p>작성시간</p></div>
							<div style="width:80px"><p>수정시간</p></div>
							<div style="width:18px">&nbsp;</div>
						</div>
						<div id="noResult2">
							<div><p>결과가 없습니다.</p></div>
						</div>
						<div id="gridBody2" style="display:none;">								
						</div>
						<div id="gridTail2" style="">
							<div class="term"></div>
							<div id="pager2"></div>
						</div>
					</div>				
				</div>	
				<div id="workList3" style="display:none">
					<table border="0" cellpadding="0" cellspacing="0" width="800">
						<tr height="24">
							<td style="padding: 0 0 0 0;text-align:left" width="400"><input type="button" class="subTitleBtn" style="width:90px;" value="3. 보관문서" ReadOnly>&nbsp;<a href="javascript:grid03List()">[새로고침]</a> &nbsp; </td>
							<td style="padding: 0 5px 0 0;" align="right" width="390"><B>Total :</B> <span id="grid03Cnt" style="font-weight:bold">0</span></td>
						</tr>
					</table>
					<table border="0" cellpadding="0" cellspacing="0" width="800"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>				
					<div id="grid3">
						<div id="gridHeader3">
							<div style="width:50px"><p>No</p></div>
							<div style="width:70px"><p>작성자</p></div>
							<div style="width:395px"><p>제 목</p></div>
							<div style="width:80px"><p>상 태</p></div>
							<div style="width:90px"><p>작성시간</p></div>
							<div style="width:90px"><p>수정시간</p></div>
							<div style="width:18px">&nbsp;</div>
						</div>
						<div id="noResult3">
							<div><p>결과가 없습니다.</p></div>
						</div>
						<div id="gridBody3" style="display:none;">								
						</div>
						<div id="gridTail3" style="">
							<div class="term"></div>
							<div id="pager3"></div>
						</div>
					</div>				
				</div>	
			</div>
			<div id="layerContents" class="lTD_trbl" style="position:absolute;width:800px;background-color:#fff;padding:10px 10px 10px 10px; z-index:4;left:290px;">
				<table border="0" cellpadding="0" cellspacing="0" width="798">
					<tr height="24">
						<td style="padding: 0 0 0 0;text-align:left" width="400"><input type="button" class="subTitleBtn" id="contentsLabel" style="width:120px;" value=""></td>
						<td style="padding: 0 5px 0 0;text-align:right" width="398">
							<input type="button" id="btnIng" onClick="fnChangeStatus('ing')" value="진행중" disabled class="inputBtn" style="width:70px"> 
							<input type="button" id="btnComplete" onClick="fnChangeStatus('complete')" disabled value="완료" class="inputBtn" style="width:70px"> 
							<input type="button" id="btnKeep" onClick="fnChangeStatus('keep')" value="장기보관" class="inputBtn" style="width:70px"> 
							<input type="button" id="btnDelete" onClick="fnChangeStatus('delete')" value="삭 제" class="inputBtn" style="width:70px">
						</td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" width="798"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>				
				<table border="0" cellpadding="0" cellspacing="0" width="798" style="background-image:url(/inc/layout/panel-title-light-bg.gif);">
					<tr height="35">
						<td style="padding: 5px 0 0 20px;font-weight:bold;text-align:left" width="100%" class="lTD_trbl"><span id="subjects"></span>&nbsp;
						</td>
					</tr>
					<tr>
						<td style="padding: 0 10px 0 0;text-align:right;text-align:right;height:23px;" width="100%" class="lTD_0rbl"><span id="sndrNm" style="font-weight:bold">&nbsp;</span> / <span id="endDt" style="text-align:left">&nbsp;</span> / <span id="writeDt" style="text-align:left">&nbsp;</span>
						</td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" width="798">
					<tr>
						<td id="contentBG" style="height:2px;background-color:#fd8c31;width:961px;"></td>
					</tr>
					<tr>
						<td height="10"></td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" width="798">
					<tr>
						<td class="lTD_t00l" width="10">&nbsp;</td>
						<td class="lTD_t0b0" width="778" colspan="3" style="padding: 10px 0 5px 10px;text-align:left"><B>수신자</B> : <span id="rcvrs"></span></td>
						<td class="lTD_tr00" width="10">&nbsp;</td>
					</tr>
					<tr>
						<td class="lTD_00bl" width="10">&nbsp;</td>
						<td class="lTD_00b0" width="518" style="padding: 10px 0 5px 10px;text-align:left"><B>첨부파일</B> : <span id="files"></span></td>
						<td class="lTD_00b0" width="10">&nbsp;</td>
						<td class="lTD_00b0" width="250" style="padding: 10px 0 5px 5px;text-align:right">
							<span id="buttons">
								<input type="button" onClick="fnOpenWorkWrite($('#workSeq').val(),'pass')" value="문서전달" class="inputBtn" style="width:65px"> 
								<input type="button" onClick="fnPrint();" value="인쇄" class="inputBtn" style="width:40px"> 
								<input type="button" onClick="fnOpenWorkWrite($('#workSeq').val(),'')" value="수정" class="inputBtn" style="width:40px">
							</span>
						</td>
						<td class="lTD_0rb0" width="10">&nbsp;</td>
					</tr>
				</table>

				<span id="showTails" style="text-align:left"></span>
				
				<table border="0" cellpadding="0" cellspacing="0" width="99.5%">
					<tr>
						<td height="10"></td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" width="798">
					<tr><td id="contentTOP" style="background-color:#3366CC;height:2px"></td></tr>
					<tr>
						<td class="lTD_trbl" width="100%" style="background-color:#FBFDFF;padding: 10px;height:295px;vertical-align:top;text-align:left">
						<span id="contents" style="text-align:left;font-size:14px;font-family:돋움"></span>&nbsp;
						</td>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" width="99.5%">
					<tr>
						<td height="10"></td>
					</tr>
				</table>
				<span id="addTail">
				<table border="0" cellpadding="0" cellspacing="0" width="798">
					<input type="hidden" id="workSeq">
					<input type="hidden" id="writeId">
					<input type="hidden" id="rcvrId">
					<tr>
						<td class="lTD_trbl" width="708" style="text-align:center;padding: 10px 10px 10px 10px"><textarea class="inputBox" id="comment" style="width:658px;height:80px"></textarea></td>
						<td class="lTD_trb0" width="90" onClick="fnSaveTail()" style="background-color:#eaf2fd;CURSOR:pointer;text-align:center;font-weight:bold">의 견<BR>달 기</td>
					</tr>
					</form>
				</table>
				</span>
			</div>
		</td>
	</tr>
</table>
</div>
<div id="layerCover" onClick="fnShowLyr()" style="position:absolute;width:818px;border-top:#999 4px solid;border-right:#999 4px solid;background-color:#CCC;filter:alpha(opacity=40); opacity:.4;z-index:5;left:300px;cursor:pointer;display:;">
</div>
<!-- 그리그 끝 -->

<script language="javascript">
	setMainMenu();
//	//## 테스트를 위한 기본 값세팅	
//	$("#prdNm").val("연습00");
//	$("#etcPrdCd").val("TEST01-00");
//	$("#remarks").val("연습중\r\nThis is testing....");
</script>
</BODY>
</HTML>